package cn.shop.cloud.mapper;


import cn.shop.cloud.domain.SeckillOrder;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @program: work
 * @ClassName SeckillOrderMapper
 * @description:
 * @author: 李尧坤
 * @create: 2025−01-09 20:12
 * @Version 1.0
 **/
@Mapper
public interface SeckillOrderMapper {

    @Select("SELECT * FROM t_seckill_order WHERE user_id=#{userId} and seckill_id=#{seckillId}")
    public SeckillOrder findUserIdAndSeckillId(Long userId, Long seckillId);

    @Insert("INSERT  INTO t_seckill_order (user_id,order_no,seckill_id) VALUES (#{userId},#{orderNo},#{seckillId}) ")
    public void insert(SeckillOrder so);
}
